{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "be7d61b7-92a1-4798-a0c3-bbd4e5164aa8",
   "metadata": {},
   "source": [
    "# 函数与文件\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b8fb048a-5ddc-430c-81df-a6cd32d7ca8f",
   "metadata": {},
   "source": [
    "## 函数\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "49657db1-de96-4603-9268-298c4b3d137d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<svg width=\"400\" height=\"400\" style=\"fill:none; stroke-linecap:round;\">\n",
       "    <rect width=\"100%\" height=\"100%\" fill=\"#F3F3F7\" />\n",
       "\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 100,100 200,100 200,200\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 100,100 150,100 150,70 100,70 100,100\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 300,300 350,300 350,270 300,270 300,300\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 100,100 150,100 109.5,129.4 125,81.8 140.5,129.4 100,100\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200 250,200 209.5,229.4 225,181.8 240.5,229.4 200,200\" />'\n",
       "\n",
       "<g transform=\"rotate(-90.0,200.0,200.0) translate(200.0, 200.0)\">\n",
       "    <circle stroke=\"#63A375\" stroke-width=\"2\" fill=\"transparent\" r=\"5.5\" cx=\"0\" cy=\"0\"/>\n",
       "    <polygon points=\"0,12 2,9 -2,9\" style=\"fill:#63A375;stroke:#63A375;stroke-width:2\"/>\n",
       "</g>\n",
       "\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import jupyturtle as t\n",
    "\n",
    "t.make_turtle(animate=True,delay=0.2, width=400, height=400)\n",
    "t.jump_to(100,100)\n",
    "t.fd(100)\n",
    "t.move_to(200,200)\n",
    "def rectangle(x,y,width,height):                ##定义函数\n",
    "    t.jump_to(x,y)\n",
    "    for i in range(4):\n",
    "        if i==0 or i==2:\n",
    "            t.fd(width)\n",
    "        else:\n",
    "            t.fd(height)\n",
    "        t.lt(90)    \n",
    "rectangle(100,100,50,30)\n",
    "rectangle(300,300,50,30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "3fa7f5bc-a3b9-48e5-ae57-e37d78851445",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<svg width=\"400\" height=\"400\" style=\"fill:none; stroke-linecap:round;\">\n",
       "    <rect width=\"100%\" height=\"100%\" fill=\"#F3F3F7\" />\n",
       "\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200 250,200 209.5,229.4 225,181.8 240.5,229.4 200,200\" />'\n",
       "\n",
       "<g transform=\"rotate(-90.0,200.0,200.0) translate(200.0, 200.0)\">\n",
       "    <circle stroke=\"#63A375\" stroke-width=\"2\" fill=\"transparent\" r=\"5.5\" cx=\"0\" cy=\"0\"/>\n",
       "    <polygon points=\"0,12 2,9 -2,9\" style=\"fill:#63A375;stroke:#63A375;stroke-width:2\"/>\n",
       "</g>\n",
       "\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import jupyturtle as t\n",
    "\n",
    "t.make_turtle(animate=True,delay=0.2, width=400, height=400)\n",
    "def pentagram(x,y,leng):\n",
    "    t.jump_to(x,y)\n",
    "    for i in range(5):\n",
    "        t.fd(leng)\n",
    "        t.rt(144)\n",
    "pentagram(200,200,50)        \n",
    "        \n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "5ebe9f52-e6df-45f4-a6ba-ea995ccef619",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<svg width=\"400\" height=\"400\" style=\"fill:none; stroke-linecap:round;\">\n",
       "    <rect width=\"100%\" height=\"100%\" fill=\"#F3F3F7\" />\n",
       "\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 247.6,184.5 170.6,240.5 200,150 229.4,240.5 152.4,184.5 247.6,184.5\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<g transform=\"rotate(54.0,200,200) translate(200, 200)\">\n",
       "    <circle stroke=\"#63A375\" stroke-width=\"2\" fill=\"transparent\" r=\"5.5\" cx=\"0\" cy=\"0\"/>\n",
       "    <polygon points=\"0,12 2,9 -2,9\" style=\"fill:#63A375;stroke:#63A375;stroke-width:2\"/>\n",
       "</g>\n",
       "\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import math\n",
    "import jupyturtle as t\n",
    "\n",
    "t.make_turtle(animate=True,delay=0.2, width=400, height=400)\n",
    "def pentagram1(x,y,r):\n",
    "    t.jump_to(x+r*math.cos(18/180*math.pi),y-r*math.sin(18/180*math.pi))\n",
    "    t.rt(144)\n",
    "    for i in range(5):\n",
    "        t.fd(2*r*math.cos(18/180*math.pi))\n",
    "        t.rt(144)\n",
    "    t.jump_to(x,y)\n",
    "pentagram1(200,200,50)        \n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "07e80389-64a4-40fc-9032-5e43970c7605",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<svg width=\"400\" height=\"400\" style=\"fill:none; stroke-linecap:round;\">\n",
       "    <rect width=\"100%\" height=\"100%\" fill=\"#F3F3F7\" />\n",
       "\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 176.5,244.1 193,150.5 234.7,236 150.8,191.3 244.9,178.1 176.5,244.1\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<g transform=\"rotate(190.0,200,200) translate(200, 200)\">\n",
       "    <circle stroke=\"#63A375\" stroke-width=\"2\" fill=\"transparent\" r=\"5.5\" cx=\"0\" cy=\"0\"/>\n",
       "    <polygon points=\"0,12 2,9 -2,9\" style=\"fill:#63A375;stroke:#63A375;stroke-width:2\"/>\n",
       "</g>\n",
       "\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import math\n",
    "import jupyturtle as t\n",
    "\n",
    "t.make_turtle(animate=True,delay=0.2, width=400, height=400)\n",
    "def pentagram2(x,y,r,angel):\n",
    "       a=r*math.cos((72+angel)/180*math.pi)\n",
    "       b=r*math.sin((72+angel)/180*math.pi)\n",
    "       t.lt(angel)\n",
    "       t.jump_to(x-b,y-a)\n",
    "       for i in range(5):\n",
    "            t.fd(2*r*math.cos(18/180*math.pi))\n",
    "            t.rt(144)\n",
    "       t.jump_to(x,y)\n",
    "pentagram2(200,200,50,80)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "a658f0ef-575e-4ea6-b6b5-ff44b8a5e2df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<svg width=\"400\" height=\"400\" style=\"fill:none; stroke-linecap:round;\">\n",
       "    <rect width=\"100%\" height=\"100%\" fill=\"#F3F3F7\" />\n",
       "\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 152.4,184.5 247.6,184.5 170.6,240.5 200,150 229.4,240.5 152.4,184.5\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 157.2,186.1 242.8,186.1 173.5,236.4 200,155 226.5,236.4 157.2,186.1\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 162,187.6 238,187.6 176.5,232.4 200,160 223.5,232.4 162,187.6\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 166.7,189.2 233.3,189.2 179.4,228.3 200,165 220.6,228.3 166.7,189.2\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 171.5,190.7 228.5,190.7 182.4,224.3 200,170 217.6,224.3 171.5,190.7\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 176.2,192.3 223.8,192.3 185.3,220.2 200,175 214.7,220.2 176.2,192.3\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 181,193.8 219,193.8 188.2,216.2 200,180 211.8,216.2 181,193.8\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 185.7,195.4 214.3,195.4 191.2,212.1 200,185 208.8,212.1 185.7,195.4\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 190.5,196.9 209.5,196.9 194.1,208.1 200,190 205.9,208.1 190.5,196.9\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 195.2,198.5 204.8,198.5 197.1,204 200,195 202.9,204 195.2,198.5\" />'\n",
       "\n",
       "<path stroke=\"#663399\" stroke-width=\"2\" d=\"M 200,200\" />'\n",
       "\n",
       "<g transform=\"rotate(-90.0,200,200) translate(200, 200)\">\n",
       "    <circle stroke=\"#63A375\" stroke-width=\"2\" fill=\"transparent\" r=\"5.5\" cx=\"0\" cy=\"0\"/>\n",
       "    <polygon points=\"0,12 2,9 -2,9\" style=\"fill:#63A375;stroke:#63A375;stroke-width:2\"/>\n",
       "</g>\n",
       "\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import math\n",
    "import jupyturtle as t\n",
    "t.make_turtle(animate=True,delay=0.2, width=400, height=400)\n",
    "def pentagram3(x,y,r,angel):\n",
    "       a=r*math.cos((72+angel)/180*math.pi)\n",
    "       b=r*math.sin((72+angel)/180*math.pi)\n",
    "       c=r/10\n",
    "       d=2*c*math.cos(18/180*math.pi)      \n",
    "       e=c*math.sin(18/180*math.pi)\n",
    "       t.lt(angel)\n",
    "       n=0\n",
    "       for i in range(10):\n",
    "           t.jump_to(x-b+n*(d/2),y-a+n*e)\n",
    "           for j in range(5):\n",
    "                t.fd(2*r*math.cos(18/180*math.pi)-i*d)\n",
    "                t.rt(144)\n",
    "           n+=1\n",
    "       t.jump_to(x,y)\n",
    "pentagram3(200,200,50,0)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2ea3c46c-08eb-4c2f-952e-f6abbbaf0892",
   "metadata": {},
   "source": [
    "## 作业一"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "221abcef-292c-49a7-8c35-d5c75c46cb53",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<svg width=\"450.0\" height=\"300\" style=\"fill:none; stroke-linecap:round;\">\n",
       "    <rect width=\"100%\" height=\"100%\" fill=\"#F3F3F7\" />\n",
       "\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 225,150\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,0 450,0\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,1.5 450,1.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,3 450,3\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,4.5 450,4.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,6 450,6\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,7.5 450,7.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,9 450,9\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,10.5 450,10.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,12 450,12\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,13.5 450,13.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,15 450,15\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,16.5 450,16.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,18 450,18\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,19.5 450,19.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,21 450,21\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,22.5 450,22.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,24 450,24\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,25.5 450,25.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,27 450,27\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,28.5 450,28.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,30 450,30\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,31.5 450,31.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,33 450,33\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,34.5 450,34.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,36 450,36\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,37.5 450,37.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,39 450,39\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,40.5 450,40.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,42 450,42\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,43.5 450,43.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,45 450,45\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,46.5 450,46.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,48 450,48\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,49.5 450,49.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,51 450,51\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,52.5 450,52.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,54 450,54\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,55.5 450,55.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,57 450,57\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,58.5 450,58.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,60 450,60\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,61.5 450,61.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,63 450,63\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,64.5 450,64.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,66 450,66\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,67.5 450,67.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,69 450,69\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,70.5 450,70.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,72 450,72\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,73.5 450,73.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,75 450,75\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,76.5 450,76.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,78 450,78\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,79.5 450,79.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,81 450,81\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,82.5 450,82.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,84 450,84\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,85.5 450,85.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,87 450,87\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,88.5 450,88.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,90 450,90\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,91.5 450,91.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,93 450,93\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,94.5 450,94.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,96 450,96\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,97.5 450,97.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,99 450,99\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,100.5 450,100.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,102 450,102\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,103.5 450,103.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,105 450,105\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,106.5 450,106.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,108 450,108\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,109.5 450,109.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,111 450,111\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,112.5 450,112.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,114 450,114\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,115.5 450,115.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,117 450,117\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,118.5 450,118.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,120 450,120\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,121.5 450,121.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,123 450,123\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,124.5 450,124.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,126 450,126\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,127.5 450,127.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,129 450,129\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,130.5 450,130.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,132 450,132\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,133.5 450,133.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,135 450,135\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,136.5 450,136.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,138 450,138\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,139.5 450,139.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,141 450,141\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,142.5 450,142.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,144 450,144\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,145.5 450,145.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,147 450,147\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,148.5 450,148.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,150 450,150\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,151.5 450,151.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,153 450,153\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,154.5 450,154.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,156 450,156\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,157.5 450,157.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,159 450,159\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,160.5 450,160.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,162 450,162\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,163.5 450,163.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,165 450,165\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,166.5 450,166.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,168 450,168\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,169.5 450,169.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,171 450,171\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,172.5 450,172.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,174 450,174\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,175.5 450,175.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,177 450,177\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,178.5 450,178.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,180 450,180\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,181.5 450,181.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,183 450,183\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,184.5 450,184.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,186 450,186\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,187.5 450,187.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,189 450,189\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,190.5 450,190.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,192 450,192\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,193.5 450,193.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,195 450,195\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,196.5 450,196.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,198 450,198\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,199.5 450,199.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,201 450,201\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,202.5 450,202.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,204 450,204\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,205.5 450,205.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,207 450,207\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,208.5 450,208.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,210 450,210\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,211.5 450,211.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,213 450,213\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,214.5 450,214.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,216 450,216\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,217.5 450,217.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,219 450,219\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,220.5 450,220.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,222 450,222\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,223.5 450,223.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,225 450,225\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,226.5 450,226.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,228 450,228\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,229.5 450,229.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,231 450,231\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,232.5 450,232.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,234 450,234\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,235.5 450,235.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,237 450,237\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,238.5 450,238.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,240 450,240\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,241.5 450,241.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,243 450,243\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,244.5 450,244.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,246 450,246\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,247.5 450,247.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,249 450,249\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,250.5 450,250.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,252 450,252\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,253.5 450,253.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,255 450,255\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,256.5 450,256.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,258 450,258\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,259.5 450,259.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,261 450,261\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,262.5 450,262.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,264 450,264\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,265.5 450,265.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,267 450,267\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,268.5 450,268.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,270 450,270\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,271.5 450,271.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,273 450,273\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,274.5 450,274.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,276 450,276\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,277.5 450,277.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,279 450,279\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,280.5 450,280.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,282 450,282\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,283.5 450,283.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,285 450,285\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,286.5 450,286.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,288 450,288\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,289.5 450,289.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,291 450,291\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,292.5 450,292.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,294 450,294\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,295.5 450,295.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,297 450,297\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 0,298.5 450,298.5\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 225,150\" />'\n",
       "\n",
       "<path stroke=\"blue\" stroke-width=\"2\" d=\"M 225,50\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 209.1,44.8 240.9,44.8 215.2,63.5 225,33.3 234.8,63.5 209.1,44.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 211.8,45.7 238.2,45.7 216.8,61.2 225,36.1 233.2,61.2 211.8,45.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 214.4,46.6 235.6,46.6 218.5,59 225,38.9 231.5,59 214.4,46.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 217.1,47.4 232.9,47.4 220.1,56.7 225,41.7 229.9,56.7 217.1,47.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 219.7,48.3 230.3,48.3 221.7,54.5 225,44.4 228.3,54.5 219.7,48.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 222.4,49.1 227.6,49.1 223.4,52.2 225,47.2 226.6,52.2 222.4,49.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 175,63.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 159.1,58.2 190.9,58.2 165.2,76.9 175,46.7 184.8,76.9 159.1,58.2\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 161.8,59.1 188.2,59.1 166.8,74.6 175,49.5 183.2,74.6 161.8,59.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 164.4,60 185.6,60 168.5,72.4 175,52.3 181.5,72.4 164.4,60\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 167.1,60.8 182.9,60.8 170.1,70.1 175,55.1 179.9,70.1 167.1,60.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 169.7,61.7 180.3,61.7 171.7,67.9 175,57.8 178.3,67.9 169.7,61.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 172.4,62.5 177.6,62.5 173.4,65.6 175,60.6 176.6,65.6 172.4,62.5\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 138.4,100\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 122.5,94.8 154.2,94.8 128.6,113.5 138.4,83.3 148.2,113.5 122.5,94.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 125.2,95.7 151.6,95.7 130.2,111.2 138.4,86.1 146.6,111.2 125.2,95.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 127.8,96.6 149,96.6 131.9,109 138.4,88.9 144.9,109 127.8,96.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 130.5,97.4 146.3,97.4 133.5,106.7 138.4,91.7 143.3,106.7 130.5,97.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 133.1,98.3 143.7,98.3 135.1,104.5 138.4,94.4 141.7,104.5 133.1,98.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 135.8,99.1 141,99.1 136.8,102.2 138.4,97.2 140,102.2 135.8,99.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 125,150\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 109.1,144.8 140.9,144.8 115.2,163.5 125,133.3 134.8,163.5 109.1,144.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 111.8,145.7 138.2,145.7 116.8,161.2 125,136.1 133.2,161.2 111.8,145.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 114.4,146.6 135.6,146.6 118.5,159 125,138.9 131.5,159 114.4,146.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 117.1,147.4 132.9,147.4 120.1,156.7 125,141.7 129.9,156.7 117.1,147.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 119.7,148.3 130.3,148.3 121.7,154.5 125,144.4 128.3,154.5 119.7,148.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 122.4,149.1 127.6,149.1 123.4,152.2 125,147.2 126.6,152.2 122.4,149.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 138.4,200\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 122.5,194.8 154.2,194.8 128.6,213.5 138.4,183.3 148.2,213.5 122.5,194.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 125.2,195.7 151.6,195.7 130.2,211.2 138.4,186.1 146.6,211.2 125.2,195.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 127.8,196.6 149,196.6 131.9,209 138.4,188.9 144.9,209 127.8,196.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 130.5,197.4 146.3,197.4 133.5,206.7 138.4,191.7 143.3,206.7 130.5,197.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 133.1,198.3 143.7,198.3 135.1,204.5 138.4,194.4 141.7,204.5 133.1,198.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 135.8,199.1 141,199.1 136.8,202.2 138.4,197.2 140,202.2 135.8,199.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 175,236.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 159.1,231.5 190.9,231.5 165.2,250.1 175,219.9 184.8,250.1 159.1,231.5\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 161.8,232.3 188.2,232.3 166.8,247.8 175,222.7 183.2,247.8 161.8,232.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 164.4,233.2 185.6,233.2 168.5,245.6 175,225.5 181.5,245.6 164.4,233.2\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 167.1,234 182.9,234 170.1,243.3 175,228.3 179.9,243.3 167.1,234\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 169.7,234.9 180.3,234.9 171.7,241.1 175,231 178.3,241.1 169.7,234.9\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 172.4,235.7 177.6,235.7 173.4,238.8 175,233.8 176.6,238.8 172.4,235.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 225,250\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 209.1,244.8 240.9,244.8 215.2,263.5 225,233.3 234.8,263.5 209.1,244.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 211.8,245.7 238.2,245.7 216.8,261.2 225,236.1 233.2,261.2 211.8,245.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 214.4,246.6 235.6,246.6 218.5,259 225,238.9 231.5,259 214.4,246.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 217.1,247.4 232.9,247.4 220.1,256.7 225,241.7 229.9,256.7 217.1,247.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 219.7,248.3 230.3,248.3 221.7,254.5 225,244.4 228.3,254.5 219.7,248.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 222.4,249.1 227.6,249.1 223.4,252.2 225,247.2 226.6,252.2 222.4,249.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 275,236.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 259.1,231.5 290.9,231.5 265.2,250.1 275,219.9 284.8,250.1 259.1,231.5\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 261.8,232.3 288.2,232.3 266.8,247.8 275,222.7 283.2,247.8 261.8,232.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 264.4,233.2 285.6,233.2 268.5,245.6 275,225.5 281.5,245.6 264.4,233.2\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 267.1,234 282.9,234 270.1,243.3 275,228.3 279.9,243.3 267.1,234\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 269.7,234.9 280.3,234.9 271.7,241.1 275,231 278.3,241.1 269.7,234.9\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 272.4,235.7 277.6,235.7 273.4,238.8 275,233.8 276.6,238.8 272.4,235.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 311.6,200\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 295.8,194.8 327.5,194.8 301.8,213.5 311.6,183.3 321.4,213.5 295.8,194.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 298.4,195.7 324.8,195.7 303.4,211.2 311.6,186.1 319.8,211.2 298.4,195.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 301,196.6 322.2,196.6 305.1,209 311.6,188.9 318.1,209 301,196.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 303.7,197.4 319.5,197.4 306.7,206.7 311.6,191.7 316.5,206.7 303.7,197.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 306.3,198.3 316.9,198.3 308.3,204.5 311.6,194.4 314.9,204.5 306.3,198.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 309,199.1 314.2,199.1 310,202.2 311.6,197.2 313.2,202.2 309,199.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 325,150\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 309.1,144.8 340.9,144.8 315.2,163.5 325,133.3 334.8,163.5 309.1,144.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 311.8,145.7 338.2,145.7 316.8,161.2 325,136.1 333.2,161.2 311.8,145.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 314.4,146.6 335.6,146.6 318.5,159 325,138.9 331.5,159 314.4,146.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 317.1,147.4 332.9,147.4 320.1,156.7 325,141.7 329.9,156.7 317.1,147.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 319.7,148.3 330.3,148.3 321.7,154.5 325,144.4 328.3,154.5 319.7,148.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 322.4,149.1 327.6,149.1 323.4,152.2 325,147.2 326.6,152.2 322.4,149.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 311.6,100\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 295.8,94.8 327.5,94.8 301.8,113.5 311.6,83.3 321.4,113.5 295.8,94.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 298.4,95.7 324.8,95.7 303.4,111.2 311.6,86.1 319.8,111.2 298.4,95.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 301,96.6 322.2,96.6 305.1,109 311.6,88.9 318.1,109 301,96.6\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 303.7,97.4 319.5,97.4 306.7,106.7 311.6,91.7 316.5,106.7 303.7,97.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 306.3,98.3 316.9,98.3 308.3,104.5 311.6,94.4 314.9,104.5 306.3,98.3\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 309,99.1 314.2,99.1 310,102.2 311.6,97.2 313.2,102.2 309,99.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 275,63.4\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 259.1,58.2 290.9,58.2 265.2,76.9 275,46.7 284.8,76.9 259.1,58.2\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 261.8,59.1 288.2,59.1 266.8,74.6 275,49.5 283.2,74.6 261.8,59.1\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 264.4,60 285.6,60 268.5,72.4 275,52.3 281.5,72.4 264.4,60\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 267.1,60.8 282.9,60.8 270.1,70.1 275,55.1 279.9,70.1 267.1,60.8\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 269.7,61.7 280.3,61.7 271.7,67.9 275,57.8 278.3,67.9 269.7,61.7\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 272.4,62.5 277.6,62.5 273.4,65.6 275,60.6 276.6,65.6 272.4,62.5\" />'\n",
       "\n",
       "<path stroke=\"yellow\" stroke-width=\"2\" d=\"M 225,150\" />'\n",
       "\n",
       "<g transform=\"rotate(-90.0,225.0,150.0) translate(225.0, 150.0)\">\n",
       "    <circle stroke=\"#63A375\" stroke-width=\"2\" fill=\"transparent\" r=\"5.5\" cx=\"0\" cy=\"0\"/>\n",
       "    <polygon points=\"0,12 2,9 -2,9\" style=\"fill:#63A375;stroke:#63A375;stroke-width:2\"/>\n",
       "</g>\n",
       "\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def EU(R):\n",
    "    import math\n",
    "    import jupyturtle as t\n",
    "    t.make_turtle(animate=True,delay=0.2, width=4.5*R, height=3*R)\n",
    "    n=0\n",
    "    \n",
    "    a=3*R/200\n",
    "    for i in range(200):\n",
    "         t.set_color(\"blue\")\n",
    "         t.jump_to(0,n*a)\n",
    "         t.fd(4.5*R)\n",
    "         n=i+1\n",
    "        \n",
    "    x0=4.5*R/2\n",
    "    y0=3*R/2\n",
    "    \n",
    "    r=R/6\n",
    "    b=r*math.cos(72/180*math.pi)\n",
    "    c=r*math.sin(72/180*math.pi)\n",
    "    d=2*(r/6)*math.cos(18/180*math.pi)      \n",
    "    e=(r/6)*math.sin(18/180*math.pi)\n",
    "    \n",
    "    for j in range(12):\n",
    "        angel=j*30\n",
    "        x1=x0-R*math.sin(angel/180*math.pi)\n",
    "        y1=y0-R*math.cos(angel/180*math.pi)\n",
    "        t.jump_to(x1,y1)\n",
    "        for k in range(6):\n",
    "           t.set_default(TURTLE_DELAY=0)\n",
    "           t.jump_to(x1-c+k*(d/2),y1-b+k*e)\n",
    "           for l in range(5):\n",
    "                t.set_color(\"yellow\")\n",
    "                t.fd(2*r*math.cos(18/180*math.pi)-k*d)\n",
    "                t.rt(144)\n",
    "    t.jump_to(x0,y0)        \n",
    "EU(100)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e2deedbb-1a38-4a8c-a0cc-3dbc2c3d28e1",
   "metadata": {},
   "source": [
    "# 文件"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "7d420184-31aa-45ad-a5a8-d0081bebb5c9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1,2,3,4,5\n",
      "6,7,8,9,10\n",
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "file = open(\"test.txt\",\"r\")\n",
    "content=file.read()\n",
    "file.close()\n",
    "print(content)\n",
    "print(type(content))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "b7fcea6e-d13f-4849-95dc-831eeb84d3d8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1,2,3,4,5\n",
      "\n",
      "2\n",
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "file = open(\"test.txt\",\"r\")\n",
    "lines=file.readlines()\n",
    "file.close()\n",
    "print(lines[0])\n",
    "print(len(lines))\n",
    "print(type(lines[0]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "76ab9d93-2746-4946-b409-eab904f92825",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1,2,3,4,5\n",
      "6,7,8,9,10\n",
      "['1', '2', '3', '4', '5\\n6', '7', '8', '9', '10']\n"
     ]
    }
   ],
   "source": [
    "with open(\"test.txt\",\"r\") as file:\n",
    "    content=file.read()\n",
    "    print(content)\n",
    "    print(content.split(\",\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b6841160-efe9-4ea6-a7d7-d4a97c8bb5af",
   "metadata": {},
   "outputs": [],
   "source": [
    "###split函数用法，拆分str"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "e38de43d-e777-40e9-84b3-20e9a9dfea06",
   "metadata": {},
   "outputs": [],
   "source": [
    "lines=[\"abc\\n\",\"def\\n\"]\n",
    "with open(\"test.txt\",\"w\") as file:       ##\"w\"取代原文件内容\n",
    "    file.writelines(lines)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "db9b5529-43d7-4927-aeff-ec34cc3e9601",
   "metadata": {},
   "outputs": [],
   "source": [
    "lines=[\"abc\\n\",\"def\\n\"]\n",
    "with open(\"test.txt\",\"a\") as file:       \n",
    "    file.writelines(lines)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a6fb6fb0-59ba-4b35-84ed-071809ae084d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "92.41,84.80,16.98,19.88,64.87,20.52,67.83,72.80,76.65,97.45,\n",
      "14.81,82.30, 0.59,54.03,72.64,32.61,72.74,82.73,97.95,47.09,\n",
      "14.78,59.37,99.27,86.10,21.01,90.17,15.71,26.62,55.09,99.19,\n",
      "74.26,29.49, 8.05, 6.59,81.94,97.92,13.52,23.53,62.74,75.62,\n",
      "89.32,22.80,13.61,98.69,36.82,14.22,73.67,58.88,43.61,34.44,\n",
      "60.34,95.11,18.09,97.36,22.61,12.98,39.52,48.70,95.54,20.45,\n",
      "64.34,19.27,80.12,51.93,89.32,78.44,98.11,22.78, 6.19,25.82,\n",
      "54.71,56.12,89.91,14.00,89.86,80.05, 7.43,86.74,81.92,87.93,\n",
      "19.64,63.20,70.03,98.45,46.84,92.14, 3.91,26.67,39.77,25.41,\n",
      "30.57,93.76,73.46,65.83,92.74, 8.53,17.98,55.02,21.81,98.75,\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "\n",
    "s = ''\n",
    "for i  in range(100):\n",
    "    num = random.random()*100\n",
    "    s = s + f\"{num:5.2f}\"+\",\"\n",
    "    if (i+1)%10 ==0:\n",
    "        s = s +'\\n'\n",
    "print(s)\n",
    "\n",
    "with open(\"test.txt\",\"w\") as file:\n",
    "    file.write(s)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0982fb66-d2cf-49d0-bed9-a9ded416d7d3",
   "metadata": {},
   "source": [
    "## 作业二"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "f3a306bd-2784-43bd-97cf-6e31f218136b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "10.29,11.51,87.40,19.37,31.75,48.43,62.62,98.70,63.92,72.48\n",
      "34.62,68.13,59.57,62.47,25.34,24.28,49.39,44.32,71.79,27.70\n",
      "43.08,26.50,19.96,91.56,61.75,46.79,73.56, 4.45,51.66,30.19\n",
      "74.17,26.20,29.61,99.35,10.07,51.48, 8.38,16.75,59.78, 4.12\n",
      "91.32,59.91,92.19, 6.34,64.18,82.01, 3.29,76.86,72.67,51.00\n",
      "95.14,16.00,26.37,83.02,84.50,53.34,94.71,68.64,19.16,17.07\n",
      " 4.17,17.57,92.30,24.54,66.15,93.53,22.68, 0.21, 8.62,31.94\n",
      "71.32,37.61,40.07,35.79,48.99, 2.89,22.24, 0.26,84.21,57.20\n",
      "78.59,93.25, 6.72,72.98, 1.11, 8.76,46.55,15.10,13.31,41.43\n",
      " 2.55,95.56,59.27,27.78,68.03,23.57, 7.75,74.83,94.86,89.21\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "b=\"\"\n",
    "for i in range(100):\n",
    "    a=random.uniform(0,100)\n",
    "    c=f\"{a:5.2f}\"\n",
    "    if ((i+1)%10==0):\n",
    "        b=b+c+\"\"\n",
    "        b=b+\"\\n\"\n",
    "    else:\n",
    "        b=b+c+\",\"\n",
    "print(b)\n",
    "\n",
    "with open(\"test.txt\",\"w\") as file:       \n",
    "    file.write(b)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9425fdfb-00bd-43cf-9a32-982347afc10e",
   "metadata": {},
   "source": [
    "## 作业三"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8393bc82-df12-4384-8c22-72a5da03656f",
   "metadata": {},
   "source": [
    "### First"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "07085a5e-5475-4b0d-a453-8f87b21cbfda",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48, 10.29, 11.51, 87.4, 19.37, 31.75, 48.43, 62.62, 98.7, 63.92, 72.48]\n"
     ]
    }
   ],
   "source": [
    "with open(\"test.txt\",\"r\") as file:\n",
    "    content=file.read()\n",
    "    list1=content.split(\"\\n\")\n",
    "    list2=[]\n",
    "    for i in range(10):\n",
    "        a=list1[0]\n",
    "        str(a)\n",
    "        for j in range(10):\n",
    "            list2+=[float(a.split(\",\")[j])]\n",
    "print(list2)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "53eec649-b665-426f-b9ff-dc213d1b8b6e",
   "metadata": {},
   "source": [
    "### second"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "6009b5e7-7d62-4cec-b27b-d27dd59e45a9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "第 1 个区间含数据 0 个\n",
      "第 2 个区间含数据 30 个\n",
      "第 3 个区间含数据 0 个\n",
      "第 4 个区间含数据 10 个\n",
      "第 5 个区间含数据 10 个\n",
      "第 6 个区间含数据 0 个\n",
      "第 7 个区间含数据 20 个\n",
      "第 8 个区间含数据 10 个\n",
      "第 9 个区间含数据 10 个\n",
      "第 10 个区间含数据 10 个\n"
     ]
    }
   ],
   "source": [
    "list3=[0,0,0,0,0,0,0,0,0,0]\n",
    "for i in range(100):\n",
    "    b=list2[i]\n",
    "    for j in range(10):\n",
    "         if j*10<=b<(j+1)*10:\n",
    "             list3[j]+=1\n",
    "for i in range(10):\n",
    "    print(\"第\",i+1,\"个区间含数据\",list3[i],\"个\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bec93c9b-7ad9-4991-ae5c-dfd7ba4d0cfa",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0977c136-7418-43a3-b47a-6261503c8526",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
